Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to web #1263

Merged
merged 69 commits into from
Dec 1, 2024
Merged

Port to web #1263

merged 69 commits into from
Dec 1, 2024

Conversation

luishfonseca
Copy link
Contributor

@luishfonseca luishfonseca commented Jun 13, 2024

Description

(Edited by @RiscadoA)

This PR ended up being absolutely gigantic.
I think the best way to review it is to give a quick look at the commits we made. They are very granular and all do pretty much a single thing, which makes it easier to follow the 'story' of what we were doing.
Make sure to at least give a look at the parts of the code which you're more familiar with/you authored, and see if stuff makes sense to you.

Web support was implemented with Emscripten, which is basically a C++ compiler which targets javascript and wasm.
Instead of outputting executables, this outputs an html page for each executable, i.e., all samples and also tesseratos.

We had to change lots of tiny nitpicks to make this work, particularly, on the rendering side.
A lot of our code was incompatible with WebGL. We reduced the interface of RenderDevice to contain only the interface supported by both OpenGL and WebGL.

We also added an action to build it here on GitHub. That action uploads the resulting artifacts, which you can download and try running on your machine. On a future PR we should improve this to automatically place the samples in their respective documentation pages. Will create issues for that soon

Checklist

  • Self-review changes.
  • Add entry to the changelog's unreleased section.

@luishfonseca luishfonseca requested review from RiscadoA and a team as code owners June 13, 2024 19:35
@luishfonseca luishfonseca linked an issue Jun 13, 2024 that may be closed by this pull request
@github-actions github-actions bot added A-Core A-Engine B-Build Related to the build configuration labels Jun 13, 2024
Copy link
Contributor

github-actions bot commented Jun 13, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1263/
on branch gh-pages at 2024-12-01 13:44 UTC

@luishfonseca luishfonseca marked this pull request as draft June 13, 2024 19:55
@luishfonseca luishfonseca force-pushed the 465-port-to-web branch 3 times, most recently from 1354f0b to 64a4c62 Compare June 13, 2024 23:02
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 6.56371% with 484 lines in your changes missing coverage. Please review.

Project coverage is 53.43%. Comparing base (c0b0ed4) to head (7f38ef9).
Report is 69 commits behind head on main.

Files with missing lines Patch % Lines
core/src/gl/ogl_render_device.cpp 0.00% 345 Missing ⚠️
...ine/src/render/shadows/atlas_rasterizer/plugin.cpp 0.00% 42 Missing ⚠️
core/src/ecs/cubos.cpp 57.69% 22 Missing ⚠️
.../src/render/shadows/cascaded_rasterizer/plugin.cpp 0.00% 20 Missing ⚠️
engine/src/gizmos/types/box.hpp 0.00% 10 Missing ⚠️
.../src/render/shadows/casters/directional_caster.cpp 0.00% 7 Missing ⚠️
engine/src/gizmos/types/ring.hpp 0.00% 6 Missing ⚠️
engine/src/imgui/imgui.cpp 0.00% 5 Missing ⚠️
core/src/io/glfw_window.cpp 0.00% 4 Missing ⚠️
engine/src/render/g_buffer_rasterizer/plugin.cpp 0.00% 3 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1263      +/-   ##
==========================================
+ Coverage   52.93%   53.43%   +0.50%     
==========================================
  Files         462      462              
  Lines       26090    25850     -240     
  Branches     2419     2389      -30     
==========================================
+ Hits        13810    13813       +3     
+ Misses      12280    12037     -243     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@luishfonseca luishfonseca force-pushed the 465-port-to-web branch 2 times, most recently from 2503415 to 7b34b73 Compare June 14, 2024 00:35
@RiscadoA RiscadoA added this to the 0.3 Standalone Editor milestone Jun 14, 2024
@RiscadoA RiscadoA force-pushed the 465-port-to-web branch 3 times, most recently from b6f5b1c to c7c0259 Compare June 14, 2024 10:27
@luishfonseca luishfonseca force-pushed the 465-port-to-web branch 2 times, most recently from 31108c1 to 832c19b Compare June 15, 2024 11:15
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

engine/src/render/picker/picker.cpp Show resolved Hide resolved
@RiscadoA RiscadoA modified the milestones: 0.3, 0.4 - ??? Aug 2, 2024
@RiscadoA RiscadoA removed this from the 0.4 milestone Sep 22, 2024
@RiscadoA RiscadoA enabled auto-merge (rebase) December 1, 2024 13:45
@RiscadoA RiscadoA merged commit 4437fdc into main Dec 1, 2024
12 checks passed
@RiscadoA RiscadoA deleted the 465-port-to-web branch December 1, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core A-Engine A-Tesseratos B-Build Related to the build configuration O-Web Related to Emscripten builds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port to web
5 participants